class NestedTryCatch
	{
	int[] array = new int[5];
	void experiment()
		{
		try
			{
			int i=1/0;
			}
		catch(ArithmeticException ae)
			{
			try
				{
				int n = array[6];
				}
			catch(ArrayIndexOutOfBoundsException aioobe)
				{
				System.out.println("Both the exceptions are handeled");
				}
			}
		}
	
	public static void main(String args[])
		{
		NestedTryCatch ntc = new NestedTryCatch();
		ntc.experiment();
		}
	}